package lab01;

public class Test05 {

    public static void main(String[] args) {
        //for
        int n = 100;
        int sum1 = 0;
        for (int i = 1; i <= n; i++)
            sum1 += i;
        System.out.println(sum1);

//while
        int m = 100;
        int j = 1, sum2 = 0;

        while (j<=m) {
            sum2 = sum2 + j;
        }
        System.out.println(sum2);

//do.....while
        int a=1,sum3=0;
        int x = 100;
        do {
            System.out.println(sum3=sum3+a);
            }
        while(a<=x);
    }
}

